<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>北京市职业介绍服务信息系统</title>
	<link rel="stylesheet" href="./styles/css/common.css">
	<link rel="stylesheet" href="./styles/css/dwcp.css">
	<link rel="stylesheet" href="./styles/css/index.css">
	<style>
		.msg_box_wrap .msg_box {
			height: 250px;
		}

		.msg_box .content {
			margin-top: 30px;
			text-align: center;
		}

		.con_btn {
			color: #fff;
			padding: 0 30px;
			height: 30px;
			background-color: #b2c7f8;
			border-color: #b2c7f8;
			line-height: 1;
			transition: all ease-in-out .3s;
			margin: 0 10px;
			cursor: pointer;
			margin-bottom: 8px;
			border-radius: 6px;
			min-width: 100px;
			box-sizing: border-box;
		}

		.msg_box .content .wdw_col {
			border: 1px solid #30b5ec !important;
			color: #7e7e7e !important;
			background-color: #fff !important;
		}

		.msg_btn {
			margin-top: 20px;
		}

		.J_qyhy {
			border: 1px solid #aaaaaa;
			width: 76%;
			box-sizing: border-box;
			height: 32px;
			line-height: 32px;
		}
	</style>
</head>

<body class="body jyzbjc">
	<include src="./include/header.html"></include>
	<!-- main 开始 -->
	<div class="main ">
		<div class="container clearfix">
			<div class="left shadow">
				<div class="card_title">
					<a class="go_fhsy" href="./index.html" title="点击返回首页">首页</a> | <h3>企业背景信息</h3>
				</div>
				<div class="index_msg clearfix">
					<form name="sqbForm" msgtype="2" validate="blur">
						<div class="content Main_introduce" id="form_wrap">
							<h2 class="title">企业背景信息</h2>
							<script type="text/html" id="form_item">
                                <%if(+data.executeResult == 1){%>
                                    <%var _data = data.dwxx.bjxx%>
                            <div class="qy_bgc">
								<div class="qy_row">
									<span class="row_span"><span style="color:red">*</span>企业性质：</span>
									<select class="row_select J_qyxz" name="" id="J_qyxz" valiflag="3,full,企业性质"
												paramete="qyxz" v_require value="<%=_data.qyxz%>"></select>
									<select class="row_select" name="" id="J_qyxz_child"></select>
								</div>
                            </div>
                            <div class="qy_bgc">
                                <div class="qy_row">
                                    <span class="row_span"><span style="color:red">*</span>企业行业：</span>
									<input type="text" class="inp_xzqh bksxfed-levelPlugin-pull_text J_qyhy" hasall='true' v_require paramete="qyhy" valiflag="128,full,企业行业" xzqhid='<%=data.qyhy%>' value="<%=_data.qyhy_mc%>"/>
                                </div>
                            </div>
                            <div class="qy_bgc clearfix">
                                <div class="qy_row_left">
                                    <span class="row_span"><span style="color:red">*</span>企业发展阶段：</span>
                                    <select class="row_select row_select_left J_qyfzjd" name="" id="J_qyfzjd"
                                        paramete="qyfzjd" v_require value="<%=_data.qyfzjd%>" valiflag="2,full,企业发展阶段"></select>
                                </div>
                                <div class="qy_row_left">
                                    <span class="row_span"><span style="color:red">*</span>企业员工数量：</span>
                                    <select class="row_select row_select_left" name="" id="J_qyygsl" paramete="qyygsl"
                                        v_require value="<%=_data.qyygsl%>" valiflag="2,full,企业员工数量"></select>
                                </div>
                            </div>
                            <div class="qy_bgc clearfix">
                                <div class="qy_row_left">
                                    <span class="row_span"><span style="color:red">*</span>企业注册年月：</span>
                                    <input class="row_select row_select_left row_inp" name="" id="min"
                                        autocomplete="off" paramete="qyzcny" v_require value="<%=_data.qyzcny%>"
                                        valiflag="7,full,企业注册年月">
                                </div>
                                <div class="qy_row_left">
                                    <span class="row_span"><span style="color:red">*</span>企业经营时间：</span>
                                    <select class="row_select row_select_left" name="" id="J_qyjysc" paramete="qyjysc"
                                        autocomplete="off" v_require value="<%=_data.qyjysc%>" valiflag="2,full,企业经营时间"></select>
                                </div>
                            </div>
                            <div class="qy_bgc clearfix">
                                <div class="qy_row_left">
                                    <span class="row_span"><span style="color:red">*</span>企业经营状况：</span>
                                    <select class="row_select row_select_left" name="" id="J_qyjzzk" paramete="qyjzzk"
                                        v_require value="<%=_data.qyjzzk%>" valiflag="2,full,企业经营状况"></select>
                                </div>
                                <div class="qy_row_left">
                                    <span class="row_span"><span style="color:red">*</span>高薪技术企业：</span>
                                    <select class="row_select row_select_left" name="" id="J_gxjsqy" paramete="gxjsqy"
                                        v_require value="<%=_data.gxjsqy%>" valiflag="1,full,高薪技术企业">
                                        <option value="">请选择</option>
                                        <option value="1">是</option>
                                        <option value="0">否</option>
                                    </select>
                                </div>
                            </div>
                            <div class="qy_bgc clearfix">
                                <div class="qy_row_left qy_info">
                                    <span class="row_span" style="width:130px"><span
                                            style="color:red;height: 60px;">*</span>单位的创新能力和效率：</span>
                                    <select class="row_select row_select_left" name="" id="J_qycxnlyxl" style="width:170px"
                                        paramete="qycxnlyxl" v_require value="<%=_data.qycxnlyxl%>" valiflag="2,full,单位的创新能力和效率">
                                    </select>
                                </div>
                                <div class="qy_row_left" >
                                    <span class="row_span" style="width:130px"><span style="color:red">*</span>单位的综合实力：</span>
                                    <select class="row_select row_select_left" name="" id="J_qyzhsl" paramete="qyzhsl" style="width:170px"
                                        v_require value="<%=_data.qyzhsl%>" valiflag="2,full,单位的综合实力"></select>
                                </div>
                            </div>
                            <div class="qy_bgc">
                                <div class="qy_row" >
                                    <span class="row_span row_span_one" ><span
                                            style="color:red">*</span>目前实施的政策法律法规对于贵单位的监管有何影响：</span>
                                    <select class=" row_select row_select_wid row_wid" name="" id="J_flgfyx"
                                        paramete="flgfyx" v_require value="<%=_data.flgfyx%>"
                                        valiflag="2,full,目前实施的政策法律法规对于贵单位的监管有何影响"></select>
                                </div>
                            </div>
                            <div class="qy_bgc">
                                <div class="qy_row">
                                    <span class="row_span row_span_one"><span
                                            style="color:red">*</span>目前实施的政策法律法规对于贵单位的发展战略有何作用：</span>
                                    <select class=" row_select row_select_wid row_wid" name="" id="J_flgfzy"
                                        paramete="flgfzy" v_require value="<%=_data.flgfzy%>"
                                        valiflag="2,full,目前实施的政策法律法规对于贵单位的发展战略有何作用"><%=_data.flgfzy%>
                                    </select>
                                </div>
                            </div>
                            <input class="bjxxid hide" value="<%=_data.bjxxid%>">
                            <%}%>
                            </script>
						</div>
					</form>
					<div class="index_choice">
						<button class="btn btn_blue_deep Btn_test J_goTest">保存</button>
					</div>
				</div>
			</div>
			<!-- 右侧公用信息 -->
			<include src="./include/rightBox.html"></include>

		</div>
	</div>
	<!-- main 结束 -->
	<include src="./include/footer.html"></include>
</body>
<script src="./common/js/vendor.js"></script>
<script src="./common/js/common.js"></script>
<script src="./common/js/validator.js"></script>
<script src="./common/date/WdatePicker.js"></script>
<script src="./common/js/levelPlugin.js"></script>
<script src="./common/json/dwhy.js"></script>
<script>
	$(function () {
		var Load = new $.Loading(); //加载
		var qyxz_id = "";//企业性质id
		//企业信息查询
		echo();
		//企业注册年月
		$(document).on('click', '#min', function () {
			WdatePicker({
				startDate: '%y-%M',
				dateFmt: 'yyyy-MM',
				// maxDate: '{%y+1}'
				maxDate: "#F{'%y-%M'}"
			});
		})
		//点击企业性质
		$(document).on('change', '.J_qyxz', function () {
			var qyxz_id = $(this).val(); //获取代码id
			$.renderCodeOther({
				url: '/dmbjk/ycjdmbCx',
				ele: $('#J_qyxz_child'),
				data: {
					table_name: 'cdg_regtype',
					dmid: qyxz_id
				},
				noSelect: true
			})
		})
		//点击保存
		$(document).on('click', '.J_goTest', function () {
			var _data = $('form[name="sqbForm"]').getFormData();
			var qyhy_val = $('.J_qyhy').val(); //企业行业的值
			_data.bjxxid = $('.bjxxid').val();
			_data.qyxz = $('#J_qyxz_child').val();
			var zyyq = $('.J_qyhy').attr('xzqhid');
			var zcdzData = $('.J_qyhy').data('data');
			if (zcdzData != undefined) {
				zyyq = zcdzData.id;
			}
			//如果企业行业为空 不能保存
			if (!qyhy_val) {
				$.layerMsg('企业行业不能为空！', "我知道了！")
			}
			// console.log('_data.qyxz',_data.qyxz);
			_data.qyhy = zyyq;
			if (validate('sqbForm')) {
				$.layerMsg('是否保存?', [
					{
						text: '是',
						cb: function () {
							$.fetch({
								url: '/zxwqy/bjxxBc',
								type: 'post',
								data: _data,
							}).done(function (res) {
								var _res = res.returnData;
								if (+_res.executeResult == 1) {
									$.layerMsg('企业背景信息保存成功!', '确定', function () {
										window.location.href = './index.html';
									})
								} else {
									$.layerMsg(_res.message, '确定');
								}
							})
						}
					}, {
						text: '否',
						cb: function () {
						}
					}
				])
			}
		})

		function echo() {
			Load.on();
			$.asyncRender({
				url: '/zxwqy/jbxxCx',
				type: 'get',
				wrap: '#form_wrap',
				tem: '#form_item',
				pos: 'returnData'
			}).done(function (res) {
				Load.off();
				loadValid();
				var _res = res.returnData;
				if (_res.executeResult === '1') {
					var sfwhbjxx = _res.dwxx.sfwhbjxx
					var _data = _res.dwxx.bjxx;
					// 企业性质
					$.renderCodeOther({ 
						url: '/dmbjk/ycjdmbCx', 
						ele: $('.J_qyxz'), 
						val: _data.qyxz_yj, 
						data: { table_name: 'cdg_regtype' },
						beforeInit:function(arr){
							arr.pop();
							return arr;
						}
					 })
					$.renderCodeOther({
						url: '/dmbjk/ycjdmbCx',
						ele: $('#J_qyxz_child'),
						val: _data.qyxz, 
						data: {
							table_name: 'cdg_regtype',
							dmid: _data.qyxz_yj
						},
						noSelect: true
					})
					//企业发展阶段
					//企业发展阶段
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('.J_qyfzjd'), val: _data.qyfzjd, data: { table_name: 'zyjs_zxwqy_d_dwfzjd' }, childName: 'zyjs_zxwqy_d_dwfzjd' })
					//企业员工数量
					
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_qyygsl'), val: _data.qyygsl, data: { table_name: 'zyjs_zxwqy_d_dwygzrs' }, childName: 'zyjs_zxwqy_d_dwygzrs' })
					//企业经营时间
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_qyjysc'), val: _data.qyjysc, data: { table_name: 'zyjs_zxwqy_d_dwjysc' }, childName: 'zyjs_zxwqy_d_dwjysc' })
					//企业经营状态
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_qyjzzk'), val: _data.qyjzzk, data: { table_name: 'zyjs_d_mqjyzk' }, childName: 'zyjs_d_mqjyzk' })
					//单位的创新能力和效率
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_qycxnlyxl'), val: _data.qycxnlyxl, data: { table_name: 'zyjs_zxwqy_d_dwcxnlhxl' }, childName: 'zyjs_zxwqy_d_dwcxnlhxl' })
					//单位的综合实力
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_qyzhsl'), val: _data.qyzhsl, data: { table_name: 'zyjs_zxwqy_d_dwzhsl' }, childName: 'zyjs_zxwqy_d_dwzhsl' })
					//目前实施的政策法律法规对于贵单位的监管有何影响
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_flgfyx'), val: _data.flgfyx, data: { table_name: 'zyjs_zxwqy_d_dwfljgyx' }, childName: 'zyjs_zxwqy_d_dwfljgyx' })
					//目前实施的政策法律法规对于贵单位的发展战略有何作用
					$.renderCodeOther({ url: '/dmbjk/dmblbCx', ele: $('#J_flgfzy'), val: _data.flgfzy, data: { table_name: 'zyjs_zxwqy_d_dwflfzzlzy' }, childName: 'zyjs_zxwqy_d_dwflfzzlzy' })

					//高薪技术企业
					$('#J_gxjsqy').val(_data.gxjsqy);
					// 企业行业
					$('.J_qyhy').pull(dwhyJSON, {
						id: 'id',
						name: 'name',
						children: 'children'
					});
					$('.J_qyhy').attr('xzqhid', _data.qyhy);
					$('.J_qyhy').val(_data.qyhy_mc);

				} else {
					$.layerMsg(_res.message, '确定');
				}
			});
		};


	});

</script>

</html>